package com.boat.io.scy;

import com.boat.io.util.FileListUtil;
import com.boat.io.util.FileUtil;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Exec {
    public static void main(String[] args) throws IOException {


        List<String> pathList = new ArrayList<>();
        pathList.add("E:\\scy\\AI101\\vehicle-core\\src\\main\\java\\cn\\yuhy");
        pathList.add("E:\\scy\\AI101\\vehicle-monitor-core\\src\\main\\java\\cn\\yuhy");
        pathList.add("E:\\scy\\AI101\\vehicle-monitor-server\\src\\main\\java\\cn\\yuhy");
        pathList.add("E:\\scy\\AI101\\vehicle-util\\src\\main\\java");
        pathList.add("E:\\scy\\AI101\\vehicle-web\\src\\main\\java\\cn\\yuhy\\vehicle");


        for (String path : pathList) {

            System.out.println("======================"+path);

            FileListUtil.find(path,1);

            List<String> list = FileListUtil.getList();
            for (String file : list) {
                List<String> contentList = FileUtil.readFileByLines(file);
                int i = 0;
                for (String line : contentList) {
                    if(line.contains("Mapping(")){
                        System.out.println(line);
                        i++;
                    }
                }
                if(i>0){
                    System.out.println(file+"---------------------------------");
                }
            }
            FileListUtil.getList().clear();
        }

    }
}
